home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-02 / nrpas13.zip / MEMCOF.DEM < prev    next >
Text File  |  1991-04-29  |  681b  |  32 lines

  1. PROGRAM d12r9(input,output,dfile);
  2. (* driver for routine MEMCOF *)
  3. CONST
  4.    n=1000;
  5.    m=10;
  6. TYPE
  7.    glnarray = ARRAY [1..n] OF real;
  8.    glmarray = ARRAY [1..m] OF real;
  9. VAR
  10.    i : integer;
  11.    pm : real;
  12.    cof,wkm : glmarray;
  13.    data,wk1,wk2 : glnarray;
  14.    dfile : text;
  15.  
  16. (*$I MODFILE.PAS *)
  17. (*$I MEMCOF.PAS *)
  18.  
  19. BEGIN
  20.    glopen(dfile,'spctrl.dat');
  21.    FOR i := 1 to n DO BEGIN
  22.       read(dfile,data[i])
  23.    END;
  24.    close(dfile);
  25.    memcof(data,n,m,pm,cof,wk1,wk2,wkm);
  26.    writeln('Coefficients for spectral estimation of SPCTRL.DAT');
  27.    writeln;
  28.    FOR i := 1 to m DO writeln('a[',i:2,'] =',cof[i]:12:6);
  29.    writeln;
  30.    writeln('b0 =',pm:12:6)
  31. END.
  32.